﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UpdateSchoolInfo.aspx.cs"
    Inherits="SchoolManagement_UpdateSchoolInfo" %>
<%@ Register TagPrefix="ftb" Namespace="FreeTextBoxControls" Assembly="FreeTextBox"  %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>修改学校信息</title>
    <link href="../Css/ys.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript" src="../My97DatePicker/WdatePicker.js"></script>

    <script src="../Js/jquery-1.4.2.min.js" type="text/javascript"></script>

     

    <script language="javascript" type="text/javascript">
        function PreviewLogo(imgFileValue) {
 
            document.all.newPreview.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = imgFileValue;
        }
        function PreviewImage(imgFileValue) {
  
            document.all.newPreviewInfo.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = imgFileValue;
        }
        function ChkInput() {
            alert();
        
        }
    </script>

    <%-- <style type="text/css">
         #newPreview{
             FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)
        }
    </style>--%>
    <style type="text/css">
        .style2
        {
            width: 228px;
        }
        .style3
        {
            white-space: nowrap;
            width: 228px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server" style="height: 580px" 
    enctype="multipart/form-data">
    <div class="mainCenter">
        <div class="contentBody">
            <div class="title">
                学校管理-->修改学校信息</div>
            <table cellpadding="0" cellspacing="0" class="ta1">
            
                <tr>
                    <td align="center" rowspan="7" class="style2">
                       <%-- <div id="newPreview" style="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);
                            width: 250px; height: 154px">
                        </div>--%>
                       <div style="schoollog"><img src="<%=LogImg %>" /></div>
                        图片规格：240*70
                    </td>

                    <td class="ta2 tag">
                        学校名称 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtVS_name" runat="server" CssClass="inp1"  ></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" Text="*"
                            ControlToValidate="txtVS_name" ErrorMessage="学校名称不能为空" ValidationGroup="register"></asp:RequiredFieldValidator>
                    </td>
                </tr> <tr>
                    <td class="ta2 tag">
                        学校网址 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtWeb" runat="server" CssClass="inp1" MaxLength="100"></asp:TextBox>
                         
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag">
                        英文名称 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtVS_englishname" runat="server" CssClass="inp1"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" Text="*"
                            ControlToValidate="txtVS_englishname" ErrorMessage="英文名称不能为空" ValidationGroup="register"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag" style="height: 26px">
                        学校状态:
                    </td>
                    <td class="ta2" style="height: 26px">
                        <asp:DropDownList ID="ddlSchoolState" runat="server" CssClass="inp2">
                            <asp:ListItem Value="1">正在使用</asp:ListItem>
                            <asp:ListItem Value="2">已经停用</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>

                    <td class="ta2 tag">
                        联系方式 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtVS_phone" runat="server" CssClass="inp1"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" Text="*"
                            ControlToValidate="txtVS_phone" ErrorMessage="联系方式不能为空" ValidationGroup="register"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>

                    <td class="ta2 tag">
                        地址 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtVS_address" runat="server" CssClass="inp1"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" Text="*"
                            ControlToValidate="txtVS_address" ErrorMessage="地址不能为空" ValidationGroup="register"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>

                    <td class="ta2 tag" style="height: 27px">
                        邮编 ：
                    </td>
                    <td class="ta2" style="height: 27px">
                        <asp:TextBox ID="txtVS_zipcode" runat="server" CssClass="inp1"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" Text="*"
                            ControlToValidate="txtVS_zipcode" ErrorMessage="邮编不能为空" ValidationGroup="register"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidat" runat="server" ErrorMessage="邮编格式不正确"
                            ControlToValidate="txtVS_zipcode" ValidationExpression="^(\d{6})$" Text="*" ValidationGroup="register"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td align="left" class="noWrapTD">
                        Logo :&nbsp;
                        <asp:FileUpload ID="FileUpload1" runat="server" Visible="true" onchange="PreviewLogo(this.value)" />
                    </td>

                    <td class="ta2 tag">
                        城市 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtVS_city" runat="server" CssClass="inp1" 
                            ></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" Text="*"
                            ControlToValidate="txtVS_city" ErrorMessage="城市不能为空" ValidationGroup="register"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="center" rowspan="5" class="style2 ta2b">
                      <%--  <div id="newPreviewInfo" style="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);
                            width: 255px; height: 296px">
                            
                        </div>--%>
                       <div class="schoolpic">  <img src="<%=SchoolFile %>"  /></div>
                           图片规格：120*150
                    </td>

                    <td class="ta2 tag">
                        省份 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtVS_province" runat="server" CssClass="inp1"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" Text="*"
                            ControlToValidate="txtVS_province" ErrorMessage="省份不能为空" ValidationGroup="register"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag">
                        联系人 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtVS_relanname" runat="server" CssClass="inp1"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" Text="*"
                            ControlToValidate="txtVS_relanname" ErrorMessage="联系人不能为空" ValidationGroup="register"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag">
                        联系人电话 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtVS_relanamephone" runat="server" CssClass="inp1"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" Text="*"
                            ControlToValidate="txtVS_relanamephone" ErrorMessage="学校电话不能为空" ValidationGroup="register"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="adfas" runat="server" ErrorMessage="联系格式不正确"
                            ControlToValidate="txtVS_relanamephone" ValidationExpression="^((\(\d{3,4}\)|\d{3,4}-)?\d{8})$|^(\d{11})$"
                            Text="*" ValidationGroup="register"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>

                    <td class="ta2 tag">
                        联系人电子邮件 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtVS_relanameemail" runat="server" CssClass="inp1"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="txtVS_relanameemail"
                            runat="server" ErrorMessage="电子邮件格式不正确" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                            ValidationGroup="register" Text="*"></asp:RegularExpressionValidator>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" Text="*"
                            ControlToValidate="txtVS_relanameemail" ErrorMessage="电子邮件不能为空" ValidationGroup="register"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag">
                        学校简介
                    </td>
                    <td class="ta2">
                     <FTB:FreeTextBox id="txtdesc" runat="server" Height="206px" Width="440px"  SupportFolder="~/FreeTextBox"   JavaScriptLocation="ExternalFile"   ButtonImagesLocation="ExternalFile"   ToolbarImagesLocation="ExternalFile"/>
                         
                    </td>
                </tr>
                <tr>
                    <td class="noWrapTD ta2">
                        简介图片 :&nbsp;
                        <asp:FileUpload ID="fuSchoolIntroduction" runat="server" Visible="true" 
                            onchange="PreviewImage(this.value)" />
                    </td>
                    <td class="ta2 tag" colspan="2">
                        <asp:Button ID="Update" runat="server" Text="修改" OnClick="Update_Click" CssClass="button"
                            ValidationGroup="register" />
                        <asp:Button ID="btnReset" runat="server" CssClass="button" Text="重置" OnClick="btnReset_Click" />
                    </td>
                </tr>
            </table>
            <p style="color: Red; text-align: left;">
                <asp:Label ID="lblMess" runat="server"></asp:Label></p>
            <p style="margin-left: 50px">
                <asp:ValidationSummary ID="validSummary" runat="server" HeaderText="错误信息" ValidationGroup="register" />
        </div>
    </div>
    </form>
</body>
</html>
